#!/usr/bin/env python
# -*- coding:utf-8 -*-

def login():
    name='tom'
    if name=='tom':
        return 1
    else :return 0

def auth(func):
    def inner():
        if not login():
            return "用户不对"
        temp = func()
        print 'after'
        return temp
    return inner

@auth
def f1():
    return "f1"